const Koa = require('koa');
const Router = require('@koa/router');

const xhsController = require('./controller/xhs');
const bController = require('./controller/b');
const { getVideoController, getTopCommentsController } = require('./controller/douyin');

const app = new Koa();
const router = new Router();

router.get('/', (ctx) => {
  ctx.body = 'JS逆向';
});

router.get('/xhs', xhsController);
router.get('/b', bController);
router.get('/douyin', getVideoController);
router.get('/douyinTopComments', getTopCommentsController);

app
  .use(router.routes())
  .use(router.allowedMethods())
  .listen(3999)